{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.chdir('../')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import DeepPurpose.DTI as models\n",
    "from DeepPurpose.utils import *\n",
    "from DeepPurpose.dataset import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Beginning Processing...\n",
      "Beginning to extract zip file...\n",
      "Default set to logspace (nM -> p) for easier regression\n",
      "Done!\n",
      "in total: 30056 drug-target pairs\n",
      "encoding drug...\n",
      "unique drugs: 68\n",
      "drug encoding finished...\n",
      "encoding protein...\n",
      "unique target sequence: 379\n",
      "-- Encoding AAC takes time. Time Reference: 24s for ~100 sequences in a CPU. Calculate your time by the unique target sequence #, instead of the entire dataset.\n",
      "protein encoding finished...\n",
      "splitting dataset...\n",
      "Done.\n",
      "cost about 297 seconds\n"
     ]
    }
   ],
   "source": [
    "from time import time\n",
    "\n",
    "t1 = time()\n",
    "X_drug, X_target, y = load_process_DAVIS('./data/', binary=False)\n",
    "\n",
    "drug_encoding = 'MPNN'\n",
    "target_encoding = 'AAC'\n",
    "train, val, test = data_process(X_drug, X_target, y, \n",
    "                                drug_encoding, target_encoding, \n",
    "                                split_method='random',frac=[0.7,0.1,0.2])\n",
    "\n",
    "# use the parameters setting provided in the paper: https://arxiv.org/abs/1801.10193\n",
    "config = generate_config(drug_encoding = drug_encoding, \n",
    "                         target_encoding = target_encoding, \n",
    "                         cls_hidden_dims = [1024,1024,512], \n",
    "                         train_epoch = 100, \n",
    "                         test_every_X_epoch = 10, \n",
    "                         LR = 0.001, \n",
    "                         batch_size = 128,\n",
    "                         hidden_dim_drug = 128,\n",
    "                         mpnn_hidden_size = 128,\n",
    "                         mpnn_depth = 3, \n",
    "                         cnn_target_filters = [32,64,96],\n",
    "                         cnn_target_kernels = [4,8,12]\n",
    "                        )\n",
    "model = models.model_initialize(**config)\n",
    "t2 = time()\n",
    "print(\"cost about \" + str(int(t2-t1)) + \" seconds\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Let's use CPU/s!\n",
      "--- Data Preparation ---\n",
      "--- Go for Training ---\n",
      "Training at Epoch 1 iteration 0 with loss 30.099525. Total time 0.0005555555555555556 hours\n",
      "Training at Epoch 1 iteration 100 with loss 0.8991968. Total time 0.025555555555555557 hours\n",
      "Validation at Epoch 1 , MSE: 0.6333563031666661 , Pearson Correlation: 0.47152453064209676 with p-value: 2.8783234657972543e-166 , Concordance Index: 0.7436296069755622\n",
      "Training at Epoch 2 iteration 0 with loss 0.5594412. Total time 0.04694444444444444 hours\n",
      "Training at Epoch 2 iteration 100 with loss 0.7445534. Total time 0.07222222222222222 hours\n",
      "Validation at Epoch 2 , MSE: 0.6204381426401602 , Pearson Correlation: 0.5078969152313477 with p-value: 6.907637519025476e-197 , Concordance Index: 0.7664927029863521\n",
      "Training at Epoch 3 iteration 0 with loss 0.6076644. Total time 0.0913888888888889 hours\n",
      "Training at Epoch 3 iteration 100 with loss 0.69004136. Total time 0.11611111111111111 hours\n",
      "Validation at Epoch 3 , MSE: 0.6104125510571017 , Pearson Correlation: 0.5361745830723483 with p-value: 2.146143863512489e-223 , Concordance Index: 0.7797608806141241\n",
      "Training at Epoch 4 iteration 0 with loss 0.65014493. Total time 0.13333333333333333 hours\n",
      "Training at Epoch 4 iteration 100 with loss 0.600279. Total time 0.15638888888888888 hours\n",
      "Validation at Epoch 4 , MSE: 0.591899966015619 , Pearson Correlation: 0.5599048604101552 with p-value: 1.1348501944363898e-247 , Concordance Index: 0.7845188459431333\n",
      "Training at Epoch 5 iteration 0 with loss 0.5849918. Total time 0.17472222222222222 hours\n",
      "Training at Epoch 5 iteration 100 with loss 0.46071917. Total time 0.21194444444444444 hours\n",
      "Validation at Epoch 5 , MSE: 0.5431236246607745 , Pearson Correlation: 0.5869877865298784 with p-value: 6.791130864781662e-278 , Concordance Index: 0.7922081579578483\n",
      "Training at Epoch 6 iteration 0 with loss 0.6295771. Total time 0.23972222222222223 hours\n",
      "Training at Epoch 6 iteration 100 with loss 0.6356133. Total time 0.27416666666666667 hours\n",
      "Validation at Epoch 6 , MSE: 0.6808713178974981 , Pearson Correlation: 0.620153857184977 with p-value: 4.95014e-319 , Concordance Index: 0.8021434496293738\n",
      "Training at Epoch 7 iteration 0 with loss 0.6206667. Total time 0.3025 hours\n",
      "Training at Epoch 7 iteration 100 with loss 0.5210643. Total time 0.33416666666666667 hours\n",
      "Validation at Epoch 7 , MSE: 0.5493500628251425 , Pearson Correlation: 0.6009188734595814 with p-value: 1.3823405367574975e-294 , Concordance Index: 0.7950933001247522\n",
      "Training at Epoch 8 iteration 0 with loss 0.5371585. Total time 0.3572222222222222 hours\n",
      "Training at Epoch 8 iteration 100 with loss 0.44393176. Total time 0.395 hours\n",
      "Validation at Epoch 8 , MSE: 0.5585138547980687 , Pearson Correlation: 0.645334453586801 with p-value: 0.0 , Concordance Index: 0.820401275244719\n",
      "Training at Epoch 9 iteration 0 with loss 0.68880135. Total time 0.42 hours\n",
      "Training at Epoch 9 iteration 100 with loss 0.36630863. Total time 0.4588888888888889 hours\n",
      "Validation at Epoch 9 , MSE: 0.45790378416708793 , Pearson Correlation: 0.6537229479809283 with p-value: 0.0 , Concordance Index: 0.8217425264190837\n",
      "Training at Epoch 10 iteration 0 with loss 0.42707026. Total time 0.4875 hours\n",
      "Training at Epoch 10 iteration 100 with loss 0.35405672. Total time 0.5230555555555556 hours\n",
      "Validation at Epoch 10 , MSE: 0.5186388718029062 , Pearson Correlation: 0.6619811548792567 with p-value: 0.0 , Concordance Index: 0.8221658478199168\n",
      "Training at Epoch 11 iteration 0 with loss 0.53881615. Total time 0.5525 hours\n",
      "Training at Epoch 11 iteration 100 with loss 0.42307615. Total time 0.5902777777777778 hours\n",
      "Validation at Epoch 11 , MSE: 0.43241314268041814 , Pearson Correlation: 0.6781762998325824 with p-value: 0.0 , Concordance Index: 0.8271902592073505\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 10 Testing MSE: 0.4813764928477147 , Pearson Correlation: 0.6370642245522775 with p-value: 0.0 , Concordance Index: 0.7990420498098798\n",
      "Training at Epoch 12 iteration 0 with loss 0.64325225. Total time 0.6275 hours\n",
      "Training at Epoch 12 iteration 100 with loss 0.30379784. Total time 0.6633333333333333 hours\n",
      "Validation at Epoch 12 , MSE: 0.4570510864107026 , Pearson Correlation: 0.695396924108379 with p-value: 0.0 , Concordance Index: 0.8400399559076878\n",
      "Training at Epoch 13 iteration 0 with loss 0.3245204. Total time 0.6897222222222222 hours\n",
      "Training at Epoch 13 iteration 100 with loss 0.6127399. Total time 0.7280555555555556 hours\n",
      "Validation at Epoch 13 , MSE: 0.42800136057818133 , Pearson Correlation: 0.7025698316207472 with p-value: 0.0 , Concordance Index: 0.8383691124992024\n",
      "Training at Epoch 14 iteration 0 with loss 0.5076731. Total time 0.7577777777777778 hours\n",
      "Training at Epoch 14 iteration 100 with loss 0.29238087. Total time 0.8005555555555556 hours\n",
      "Validation at Epoch 14 , MSE: 0.45276742743924164 , Pearson Correlation: 0.699919901219034 with p-value: 0.0 , Concordance Index: 0.8335312793591213\n",
      "Training at Epoch 15 iteration 0 with loss 0.44354638. Total time 0.8258333333333333 hours\n",
      "Training at Epoch 15 iteration 100 with loss 0.451846. Total time 0.8586111111111111 hours\n",
      "Validation at Epoch 15 , MSE: 0.5540525572713315 , Pearson Correlation: 0.7195666592709293 with p-value: 0.0 , Concordance Index: 0.8373647142690556\n",
      "Training at Epoch 16 iteration 0 with loss 0.5630586. Total time 0.8825 hours\n",
      "Training at Epoch 16 iteration 100 with loss 0.478855. Total time 0.9175 hours\n",
      "Validation at Epoch 16 , MSE: 0.3965698884180838 , Pearson Correlation: 0.7198487705988668 with p-value: 0.0 , Concordance Index: 0.8438960530339867\n",
      "Training at Epoch 17 iteration 0 with loss 0.3240101. Total time 0.9425 hours\n",
      "Training at Epoch 17 iteration 100 with loss 0.45400283. Total time 0.9788888888888889 hours\n",
      "Validation at Epoch 17 , MSE: 0.37792913106707227 , Pearson Correlation: 0.73002402063108 with p-value: 0.0 , Concordance Index: 0.8481215662891831\n",
      "Training at Epoch 18 iteration 0 with loss 0.413083. Total time 1.0077777777777779 hours\n",
      "Training at Epoch 18 iteration 100 with loss 0.4195894. Total time 1.0397222222222222 hours\n",
      "Validation at Epoch 18 , MSE: 0.5110180347663267 , Pearson Correlation: 0.7283023915215646 with p-value: 0.0 , Concordance Index: 0.8351988224448351\n",
      "Training at Epoch 19 iteration 0 with loss 0.5379783. Total time 1.0622222222222222 hours\n",
      "Training at Epoch 19 iteration 100 with loss 0.25769988. Total time 1.0925 hours\n",
      "Validation at Epoch 19 , MSE: 0.39506137241833583 , Pearson Correlation: 0.7437639850465004 with p-value: 0.0 , Concordance Index: 0.8464496227731072\n",
      "Training at Epoch 20 iteration 0 with loss 0.37526828. Total time 1.1177777777777778 hours\n",
      "Training at Epoch 20 iteration 100 with loss 0.43821073. Total time 1.1511111111111112 hours\n",
      "Validation at Epoch 20 , MSE: 0.36622105313983927 , Pearson Correlation: 0.7399234608417687 with p-value: 0.0 , Concordance Index: 0.8442296056554331\n",
      "Training at Epoch 21 iteration 0 with loss 0.43495357. Total time 1.1722222222222223 hours\n",
      "Training at Epoch 21 iteration 100 with loss 0.35942438. Total time 1.2091666666666667 hours\n",
      "Validation at Epoch 21 , MSE: 0.3542857743149273 , Pearson Correlation: 0.7551764880180181 with p-value: 0.0 , Concordance Index: 0.8540117623503579\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 20 Testing MSE: 0.3737021191676548 , Pearson Correlation: 0.7372325996984646 with p-value: 0.0 , Concordance Index: 0.8363628509003841\n",
      "Training at Epoch 22 iteration 0 with loss 0.2378037. Total time 1.2580555555555555 hours\n",
      "Training at Epoch 22 iteration 100 with loss 0.3641736. Total time 1.2977777777777777 hours\n",
      "Validation at Epoch 22 , MSE: 0.3351357384656188 , Pearson Correlation: 0.7636068830791765 with p-value: 0.0 , Concordance Index: 0.8524900935311474\n",
      "Training at Epoch 23 iteration 0 with loss 0.27310145. Total time 1.3194444444444444 hours\n",
      "Training at Epoch 23 iteration 100 with loss 0.34919274. Total time 1.3630555555555555 hours\n",
      "Validation at Epoch 23 , MSE: 0.36185781972680087 , Pearson Correlation: 0.7652950215915697 with p-value: 0.0 , Concordance Index: 0.8596619149352807\n",
      "Training at Epoch 24 iteration 0 with loss 0.3957744. Total time 1.3941666666666668 hours\n",
      "Training at Epoch 24 iteration 100 with loss 0.3565238. Total time 1.4288888888888889 hours\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Validation at Epoch 24 , MSE: 0.39359366350744673 , Pearson Correlation: 0.7810317714912944 with p-value: 0.0 , Concordance Index: 0.8710528689705853\n",
      "Training at Epoch 25 iteration 0 with loss 0.3127577. Total time 1.4525 hours\n",
      "Training at Epoch 25 iteration 100 with loss 0.32820654. Total time 1.478888888888889 hours\n",
      "Validation at Epoch 25 , MSE: 0.36442591434098004 , Pearson Correlation: 0.773628054049482 with p-value: 0.0 , Concordance Index: 0.8535332155484806\n",
      "Training at Epoch 26 iteration 0 with loss 0.30815893. Total time 1.4975 hours\n",
      "Training at Epoch 26 iteration 100 with loss 0.30113938. Total time 1.5302777777777778 hours\n",
      "Validation at Epoch 26 , MSE: 0.3549715202222955 , Pearson Correlation: 0.7818788864291206 with p-value: 0.0 , Concordance Index: 0.8627844603202193\n",
      "Training at Epoch 27 iteration 0 with loss 0.28623033. Total time 1.5572222222222223 hours\n",
      "Training at Epoch 27 iteration 100 with loss 0.19720313. Total time 1.5891666666666666 hours\n",
      "Validation at Epoch 27 , MSE: 0.3105833151401006 , Pearson Correlation: 0.7846995272400361 with p-value: 0.0 , Concordance Index: 0.8645683947890104\n",
      "Training at Epoch 28 iteration 0 with loss 0.2925472. Total time 1.6163888888888889 hours\n",
      "Training at Epoch 28 iteration 100 with loss 0.35365868. Total time 1.646388888888889 hours\n",
      "Validation at Epoch 28 , MSE: 0.30872460186914974 , Pearson Correlation: 0.7866966034995717 with p-value: 0.0 , Concordance Index: 0.8705716819104908\n",
      "Training at Epoch 29 iteration 0 with loss 0.23867388. Total time 1.6677777777777778 hours\n",
      "Training at Epoch 29 iteration 100 with loss 0.18939327. Total time 1.7 hours\n",
      "Validation at Epoch 29 , MSE: 0.31035816019063106 , Pearson Correlation: 0.7848177107592132 with p-value: 0.0 , Concordance Index: 0.8616832526221064\n",
      "Training at Epoch 30 iteration 0 with loss 0.3331108. Total time 1.7208333333333334 hours\n",
      "Training at Epoch 30 iteration 100 with loss 0.28318024. Total time 1.7516666666666667 hours\n",
      "Validation at Epoch 30 , MSE: 0.30185604413654676 , Pearson Correlation: 0.7919363435070192 with p-value: 0.0 , Concordance Index: 0.86939478681015\n",
      "Training at Epoch 31 iteration 0 with loss 0.3263801. Total time 1.7738888888888888 hours\n",
      "Training at Epoch 31 iteration 100 with loss 0.42254806. Total time 1.8058333333333334 hours\n",
      "Validation at Epoch 31 , MSE: 0.2917747953508871 , Pearson Correlation: 0.7973023560317152 with p-value: 0.0 , Concordance Index: 0.8637648762048928\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 30 Testing MSE: 0.3246778457009768 , Pearson Correlation: 0.774888821223302 with p-value: 0.0 , Concordance Index: 0.8390866056833526\n",
      "Training at Epoch 32 iteration 0 with loss 0.19281891. Total time 1.8383333333333334 hours\n",
      "Training at Epoch 32 iteration 100 with loss 0.25856704. Total time 1.8666666666666667 hours\n",
      "Validation at Epoch 32 , MSE: 0.2913912113686265 , Pearson Correlation: 0.8017626133766826 with p-value: 0.0 , Concordance Index: 0.8620709305370066\n",
      "Training at Epoch 33 iteration 0 with loss 0.23599228. Total time 1.8872222222222221 hours\n",
      "Training at Epoch 33 iteration 100 with loss 0.32526466. Total time 1.9169444444444443 hours\n",
      "Validation at Epoch 33 , MSE: 0.33900506888256915 , Pearson Correlation: 0.796476144428027 with p-value: 0.0 , Concordance Index: 0.8630201033661092\n",
      "Training at Epoch 34 iteration 0 with loss 0.3804836. Total time 1.9388888888888889 hours\n",
      "Training at Epoch 34 iteration 100 with loss 0.23168808. Total time 1.971111111111111 hours\n",
      "Validation at Epoch 34 , MSE: 0.2902800383083106 , Pearson Correlation: 0.7985041575515968 with p-value: 0.0 , Concordance Index: 0.8657804933322479\n",
      "Training at Epoch 35 iteration 0 with loss 0.22937503. Total time 1.9927777777777778 hours\n",
      "Training at Epoch 35 iteration 100 with loss 0.1675765. Total time 2.024722222222222 hours\n",
      "Validation at Epoch 35 , MSE: 0.29910578286851036 , Pearson Correlation: 0.8053947733892968 with p-value: 0.0 , Concordance Index: 0.8687389026646806\n",
      "Training at Epoch 36 iteration 0 with loss 0.19671196. Total time 2.051111111111111 hours\n",
      "Training at Epoch 36 iteration 100 with loss 0.33883736. Total time 2.081111111111111 hours\n",
      "Validation at Epoch 36 , MSE: 0.29007373408361253 , Pearson Correlation: 0.8077704503920224 with p-value: 0.0 , Concordance Index: 0.8663562896451273\n",
      "Training at Epoch 37 iteration 0 with loss 0.43856323. Total time 2.1044444444444443 hours\n",
      "Training at Epoch 37 iteration 100 with loss 0.33567446. Total time 2.1375 hours\n",
      "Validation at Epoch 37 , MSE: 0.30644791688036155 , Pearson Correlation: 0.8052125292925878 with p-value: 0.0 , Concordance Index: 0.8672491369655952\n",
      "Training at Epoch 38 iteration 0 with loss 0.23401214. Total time 2.161111111111111 hours\n",
      "Training at Epoch 38 iteration 100 with loss 0.27506176. Total time 2.193611111111111 hours\n",
      "Validation at Epoch 38 , MSE: 0.3092280163253159 , Pearson Correlation: 0.8059533717514127 with p-value: 0.0 , Concordance Index: 0.867709862024506\n",
      "Training at Epoch 39 iteration 0 with loss 0.20131038. Total time 2.2180555555555554 hours\n",
      "Training at Epoch 39 iteration 100 with loss 0.21657985. Total time 2.251388888888889 hours\n",
      "Validation at Epoch 39 , MSE: 0.34845105545432764 , Pearson Correlation: 0.8123655024106763 with p-value: 0.0 , Concordance Index: 0.8651226289931155\n",
      "Training at Epoch 40 iteration 0 with loss 0.25696138. Total time 2.2744444444444443 hours\n",
      "Training at Epoch 40 iteration 100 with loss 0.2842762. Total time 2.3075 hours\n",
      "Validation at Epoch 40 , MSE: 0.28370908033027115 , Pearson Correlation: 0.8151126913066356 with p-value: 0.0 , Concordance Index: 0.8689113995348745\n",
      "Training at Epoch 41 iteration 0 with loss 0.21695447. Total time 2.335 hours\n",
      "Training at Epoch 41 iteration 100 with loss 0.2554765. Total time 2.3630555555555555 hours\n",
      "Validation at Epoch 41 , MSE: 0.2662490792606114 , Pearson Correlation: 0.8232039549187211 with p-value: 0.0 , Concordance Index: 0.8728416439127746\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 40 Testing MSE: 0.30498383135473417 , Pearson Correlation: 0.7953220159646318 with p-value: 0.0 , Concordance Index: 0.8478149001665806\n",
      "Training at Epoch 42 iteration 0 with loss 0.2116869. Total time 2.3930555555555557 hours\n",
      "Training at Epoch 42 iteration 100 with loss 0.18286349. Total time 2.4291666666666667 hours\n",
      "Validation at Epoch 42 , MSE: 0.3169455780058641 , Pearson Correlation: 0.8157516603697661 with p-value: 0.0 , Concordance Index: 0.8718885106963461\n",
      "Training at Epoch 43 iteration 0 with loss 0.27747488. Total time 2.45 hours\n",
      "Training at Epoch 43 iteration 100 with loss 0.26890585. Total time 2.4791666666666665 hours\n",
      "Validation at Epoch 43 , MSE: 0.27480905061689775 , Pearson Correlation: 0.8265366363651233 with p-value: 0.0 , Concordance Index: 0.8768973005559944\n",
      "Training at Epoch 44 iteration 0 with loss 0.14808476. Total time 2.5036111111111112 hours\n",
      "Training at Epoch 44 iteration 100 with loss 0.25803927. Total time 2.537777777777778 hours\n",
      "Validation at Epoch 44 , MSE: 0.2654594145910893 , Pearson Correlation: 0.8226381490143115 with p-value: 0.0 , Concordance Index: 0.8775399834103775\n",
      "Training at Epoch 45 iteration 0 with loss 0.27853924. Total time 2.5644444444444443 hours\n",
      "Training at Epoch 45 iteration 100 with loss 0.254015. Total time 2.597777777777778 hours\n",
      "Validation at Epoch 45 , MSE: 0.26559746751057 , Pearson Correlation: 0.8176782088197903 with p-value: 0.0 , Concordance Index: 0.8702704724522058\n",
      "Training at Epoch 46 iteration 0 with loss 0.19802547. Total time 2.6216666666666666 hours\n",
      "Training at Epoch 46 iteration 100 with loss 0.19961488. Total time 2.653888888888889 hours\n",
      "Validation at Epoch 46 , MSE: 0.26064588196550587 , Pearson Correlation: 0.8212622240193852 with p-value: 0.0 , Concordance Index: 0.869988844909032\n",
      "Training at Epoch 47 iteration 0 with loss 0.1899186. Total time 2.673611111111111 hours\n",
      "Training at Epoch 47 iteration 100 with loss 0.1625732. Total time 2.700833333333333 hours\n",
      "Validation at Epoch 47 , MSE: 0.29370160374774784 , Pearson Correlation: 0.8045933198724182 with p-value: 0.0 , Concordance Index: 0.868369046492747\n",
      "Training at Epoch 48 iteration 0 with loss 0.21516179. Total time 2.7205555555555554 hours\n",
      "Training at Epoch 48 iteration 100 with loss 0.22875106. Total time 2.7475 hours\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Validation at Epoch 48 , MSE: 0.27651443989441804 , Pearson Correlation: 0.8205723424358133 with p-value: 0.0 , Concordance Index: 0.8777173207539697\n",
      "Training at Epoch 49 iteration 0 with loss 0.17394634. Total time 2.7666666666666666 hours\n",
      "Training at Epoch 49 iteration 100 with loss 0.16987932. Total time 2.7969444444444442 hours\n",
      "Validation at Epoch 49 , MSE: 0.2637802035519098 , Pearson Correlation: 0.8311577464509414 with p-value: 0.0 , Concordance Index: 0.8781404221332846\n",
      "Training at Epoch 50 iteration 0 with loss 0.23825493. Total time 2.8233333333333333 hours\n",
      "Training at Epoch 50 iteration 100 with loss 0.20678242. Total time 2.8633333333333333 hours\n",
      "Validation at Epoch 50 , MSE: 0.25790723334021143 , Pearson Correlation: 0.8248827037021912 with p-value: 0.0 , Concordance Index: 0.8775003795371187\n",
      "Training at Epoch 51 iteration 0 with loss 0.11666316. Total time 2.8866666666666667 hours\n",
      "Training at Epoch 51 iteration 100 with loss 0.29134256. Total time 2.9230555555555555 hours\n",
      "Validation at Epoch 51 , MSE: 0.2762105222825639 , Pearson Correlation: 0.8195883388701748 with p-value: 0.0 , Concordance Index: 0.8744436205860934\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 50 Testing MSE: 0.3020728367282373 , Pearson Correlation: 0.7993901345579864 with p-value: 0.0 , Concordance Index: 0.8445285040899904\n",
      "Training at Epoch 52 iteration 0 with loss 0.23521692. Total time 2.9516666666666667 hours\n",
      "Training at Epoch 52 iteration 100 with loss 0.21107288. Total time 2.979722222222222 hours\n",
      "Validation at Epoch 52 , MSE: 0.2679739490410986 , Pearson Correlation: 0.8237393794928631 with p-value: 0.0 , Concordance Index: 0.8793225977500599\n",
      "Training at Epoch 53 iteration 0 with loss 0.12581596. Total time 3.0025 hours\n",
      "Training at Epoch 53 iteration 100 with loss 0.14912654. Total time 3.035833333333333 hours\n",
      "Validation at Epoch 53 , MSE: 0.26920952756860816 , Pearson Correlation: 0.8211562313794297 with p-value: 0.0 , Concordance Index: 0.8760845410681165\n",
      "Training at Epoch 54 iteration 0 with loss 0.1598201. Total time 3.0613888888888887 hours\n",
      "Training at Epoch 54 iteration 100 with loss 0.15591098. Total time 3.0919444444444446 hours\n",
      "Validation at Epoch 54 , MSE: 0.24659711307887072 , Pearson Correlation: 0.8347312889338536 with p-value: 0.0 , Concordance Index: 0.8767206232769564\n",
      "Training at Epoch 55 iteration 0 with loss 0.17625451. Total time 3.12 hours\n",
      "Training at Epoch 55 iteration 100 with loss 0.13632183. Total time 3.154166666666667 hours\n",
      "Validation at Epoch 55 , MSE: 0.26555370324198485 , Pearson Correlation: 0.8192429077811225 with p-value: 0.0 , Concordance Index: 0.8754057746847642\n",
      "Training at Epoch 56 iteration 0 with loss 0.15218374. Total time 3.1783333333333332 hours\n",
      "Training at Epoch 56 iteration 100 with loss 0.13739704. Total time 3.2086111111111113 hours\n",
      "Validation at Epoch 56 , MSE: 0.25970474113281183 , Pearson Correlation: 0.8308325277948017 with p-value: 0.0 , Concordance Index: 0.8823474535809602\n",
      "Training at Epoch 57 iteration 0 with loss 0.19822055. Total time 3.227777777777778 hours\n",
      "Training at Epoch 57 iteration 100 with loss 0.13992035. Total time 3.2544444444444443 hours\n",
      "Validation at Epoch 57 , MSE: 0.27746482172453873 , Pearson Correlation: 0.819473898886384 with p-value: 0.0 , Concordance Index: 0.8782530731505541\n",
      "Training at Epoch 58 iteration 0 with loss 0.15229881. Total time 3.2736111111111112 hours\n",
      "Training at Epoch 58 iteration 100 with loss 0.18175049. Total time 3.3005555555555555 hours\n",
      "Validation at Epoch 58 , MSE: 0.24489321916629486 , Pearson Correlation: 0.8348360136454583 with p-value: 0.0 , Concordance Index: 0.8863212622194451\n",
      "Training at Epoch 59 iteration 0 with loss 0.12718675. Total time 3.3194444444444446 hours\n",
      "Training at Epoch 59 iteration 100 with loss 0.16486329. Total time 3.346111111111111 hours\n",
      "Validation at Epoch 59 , MSE: 0.24962330849172382 , Pearson Correlation: 0.8302794572587917 with p-value: 0.0 , Concordance Index: 0.877113361686773\n",
      "Training at Epoch 60 iteration 0 with loss 0.19151184. Total time 3.3652777777777776 hours\n",
      "Training at Epoch 60 iteration 100 with loss 0.20600528. Total time 3.3916666666666666 hours\n",
      "Validation at Epoch 60 , MSE: 0.2633883802630869 , Pearson Correlation: 0.8205458965884398 with p-value: 0.0 , Concordance Index: 0.8740625433167364\n",
      "Training at Epoch 61 iteration 0 with loss 0.13153072. Total time 3.4105555555555553 hours\n",
      "Training at Epoch 61 iteration 100 with loss 0.12576813. Total time 3.4375 hours\n",
      "Validation at Epoch 61 , MSE: 0.2532385489376772 , Pearson Correlation: 0.8310408703498742 with p-value: 0.0 , Concordance Index: 0.8800161055751252\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 60 Testing MSE: 0.29539494357306945 , Pearson Correlation: 0.8056015161560879 with p-value: 0.0 , Concordance Index: 0.8583459566258476\n",
      "Training at Epoch 62 iteration 0 with loss 0.18893693. Total time 3.4608333333333334 hours\n",
      "Training at Epoch 62 iteration 100 with loss 0.18803225. Total time 3.4875 hours\n",
      "Validation at Epoch 62 , MSE: 0.25299143789841333 , Pearson Correlation: 0.8305433652685397 with p-value: 0.0 , Concordance Index: 0.8820570251770623\n",
      "Training at Epoch 63 iteration 0 with loss 0.11573613. Total time 3.506666666666667 hours\n",
      "Training at Epoch 63 iteration 100 with loss 0.14155626. Total time 3.533611111111111 hours\n",
      "Validation at Epoch 63 , MSE: 0.2643301613629096 , Pearson Correlation: 0.8246104131795757 with p-value: 0.0 , Concordance Index: 0.8710726709072147\n",
      "Training at Epoch 64 iteration 0 with loss 0.24812682. Total time 3.5533333333333332 hours\n",
      "Training at Epoch 64 iteration 100 with loss 0.17926869. Total time 3.5797222222222222 hours\n",
      "Validation at Epoch 64 , MSE: 0.26562759878282777 , Pearson Correlation: 0.8215104689022986 with p-value: 0.0 , Concordance Index: 0.8813514161685013\n",
      "Training at Epoch 65 iteration 0 with loss 0.090319395. Total time 3.598611111111111 hours\n",
      "Training at Epoch 65 iteration 100 with loss 0.17613481. Total time 3.625 hours\n",
      "Validation at Epoch 65 , MSE: 0.2600179715461331 , Pearson Correlation: 0.8221368428833766 with p-value: 0.0 , Concordance Index: 0.8764495567666518\n",
      "Training at Epoch 66 iteration 0 with loss 0.12704886. Total time 3.6441666666666666 hours\n",
      "Training at Epoch 66 iteration 100 with loss 0.1360525. Total time 3.671111111111111 hours\n",
      "Validation at Epoch 66 , MSE: 0.2561640894111719 , Pearson Correlation: 0.8296565296092506 with p-value: 0.0 , Concordance Index: 0.880634806084035\n",
      "Training at Epoch 67 iteration 0 with loss 0.103291415. Total time 3.69 hours\n",
      "Training at Epoch 67 iteration 100 with loss 0.19097942. Total time 3.7216666666666667 hours\n",
      "Validation at Epoch 67 , MSE: 0.26165170562740836 , Pearson Correlation: 0.8202928061381196 with p-value: 0.0 , Concordance Index: 0.8766915804365667\n",
      "Training at Epoch 68 iteration 0 with loss 0.25596312. Total time 3.7416666666666667 hours\n",
      "Training at Epoch 68 iteration 100 with loss 0.1591224. Total time 3.773888888888889 hours\n",
      "Validation at Epoch 68 , MSE: 0.2518606125314603 , Pearson Correlation: 0.8295707976188285 with p-value: 0.0 , Concordance Index: 0.8827115891934231\n",
      "Training at Epoch 69 iteration 0 with loss 0.08691958. Total time 3.7958333333333334 hours\n",
      "Training at Epoch 69 iteration 100 with loss 0.11615958. Total time 3.8294444444444444 hours\n",
      "Validation at Epoch 69 , MSE: 0.2713289715854075 , Pearson Correlation: 0.8271809440611247 with p-value: 0.0 , Concordance Index: 0.8817791379996963\n",
      "Training at Epoch 70 iteration 0 with loss 0.14327137. Total time 3.855277777777778 hours\n",
      "Training at Epoch 70 iteration 100 with loss 0.15443434. Total time 3.903888888888889 hours\n",
      "Validation at Epoch 70 , MSE: 0.25486677445244116 , Pearson Correlation: 0.8274978199595522 with p-value: 0.0 , Concordance Index: 0.8787397607486012\n",
      "Training at Epoch 71 iteration 0 with loss 0.13224438. Total time 3.9272222222222224 hours\n",
      "Training at Epoch 71 iteration 100 with loss 0.28633696. Total time 3.962222222222222 hours\n",
      "Validation at Epoch 71 , MSE: 0.26385849896379604 , Pearson Correlation: 0.8270232239529651 with p-value: 0.0 , Concordance Index: 0.8796840931043056\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 70 Testing MSE: 0.30310989722375664 , Pearson Correlation: 0.8007098077339073 with p-value: 0.0 , Concordance Index: 0.8536328552008201\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training at Epoch 72 iteration 0 with loss 0.11353967. Total time 3.9972222222222222 hours\n",
      "Training at Epoch 72 iteration 100 with loss 0.14121494. Total time 4.038888888888889 hours\n",
      "Validation at Epoch 72 , MSE: 0.2632047108507704 , Pearson Correlation: 0.8219094709246446 with p-value: 0.0 , Concordance Index: 0.8801804616491493\n",
      "Training at Epoch 73 iteration 0 with loss 0.1764414. Total time 4.0616666666666665 hours\n",
      "Training at Epoch 73 iteration 100 with loss 0.13883263. Total time 4.094722222222222 hours\n",
      "Validation at Epoch 73 , MSE: 0.2508451539967515 , Pearson Correlation: 0.8352459705756302 with p-value: 0.0 , Concordance Index: 0.8806900314850793\n",
      "Training at Epoch 74 iteration 0 with loss 0.14637107. Total time 4.1161111111111115 hours\n",
      "Training at Epoch 74 iteration 100 with loss 0.11852452. Total time 4.155555555555556 hours\n",
      "Validation at Epoch 74 , MSE: 0.2703464969919025 , Pearson Correlation: 0.824070420884423 with p-value: 0.0 , Concordance Index: 0.8775424036470767\n",
      "Training at Epoch 75 iteration 0 with loss 0.13235229. Total time 4.1825 hours\n",
      "Training at Epoch 75 iteration 100 with loss 0.1332179. Total time 4.219166666666666 hours\n",
      "Validation at Epoch 75 , MSE: 0.25474880817899276 , Pearson Correlation: 0.8269076328045667 with p-value: 0.0 , Concordance Index: 0.8766070921736145\n",
      "Training at Epoch 76 iteration 0 with loss 0.18996006. Total time 4.2425 hours\n",
      "Training at Epoch 76 iteration 100 with loss 0.15422696. Total time 4.2747222222222225 hours\n",
      "Validation at Epoch 76 , MSE: 0.290264292439204 , Pearson Correlation: 0.8282051862731457 with p-value: 0.0 , Concordance Index: 0.8770634168021633\n",
      "Training at Epoch 77 iteration 0 with loss 0.19149342. Total time 4.3025 hours\n",
      "Training at Epoch 77 iteration 100 with loss 0.16652364. Total time 4.339166666666666 hours\n",
      "Validation at Epoch 77 , MSE: 0.24464292216452768 , Pearson Correlation: 0.8355877996765778 with p-value: 0.0 , Concordance Index: 0.8833060873353414\n",
      "Training at Epoch 78 iteration 0 with loss 0.12847982. Total time 4.365555555555556 hours\n",
      "Training at Epoch 78 iteration 100 with loss 0.07858716. Total time 4.392222222222222 hours\n",
      "Validation at Epoch 78 , MSE: 0.270379368832418 , Pearson Correlation: 0.8213780038290203 with p-value: 0.0 , Concordance Index: 0.875712924724038\n",
      "Training at Epoch 79 iteration 0 with loss 0.12430791. Total time 4.411111111111111 hours\n",
      "Training at Epoch 79 iteration 100 with loss 0.1490658. Total time 4.443611111111111 hours\n",
      "Validation at Epoch 79 , MSE: 0.26174872983190905 , Pearson Correlation: 0.8210211534289348 with p-value: 0.0 , Concordance Index: 0.8720046820579053\n",
      "Training at Epoch 80 iteration 0 with loss 0.08768938. Total time 4.468333333333334 hours\n",
      "Training at Epoch 80 iteration 100 with loss 0.17091112. Total time 4.512222222222222 hours\n",
      "Validation at Epoch 80 , MSE: 0.2655884230158147 , Pearson Correlation: 0.826148910203313 with p-value: 0.0 , Concordance Index: 0.8743100675246039\n",
      "Training at Epoch 81 iteration 0 with loss 0.10241243. Total time 4.5408333333333335 hours\n",
      "Training at Epoch 81 iteration 100 with loss 0.1007137. Total time 4.5808333333333335 hours\n",
      "Validation at Epoch 81 , MSE: 0.262395668815651 , Pearson Correlation: 0.8240698342068733 with p-value: 0.0 , Concordance Index: 0.8747536309051025\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 80 Testing MSE: 0.2868250026685084 , Pearson Correlation: 0.8069543610306584 with p-value: 0.0 , Concordance Index: 0.8479749543997972\n",
      "Training at Epoch 82 iteration 0 with loss 0.15962937. Total time 4.618055555555555 hours\n",
      "Training at Epoch 82 iteration 100 with loss 0.10149479. Total time 4.658611111111111 hours\n",
      "Validation at Epoch 82 , MSE: 0.25576279493295156 , Pearson Correlation: 0.8266674471826304 with p-value: 0.0 , Concordance Index: 0.8765903705382386\n",
      "Training at Epoch 83 iteration 0 with loss 0.13341856. Total time 4.686111111111111 hours\n",
      "Training at Epoch 83 iteration 100 with loss 0.18881573. Total time 4.721388888888889 hours\n",
      "Validation at Epoch 83 , MSE: 0.2819414102273309 , Pearson Correlation: 0.8192232060659695 with p-value: 0.0 , Concordance Index: 0.8793338188474833\n",
      "Training at Epoch 84 iteration 0 with loss 0.094061725. Total time 4.745833333333334 hours\n",
      "Training at Epoch 84 iteration 100 with loss 0.11420463. Total time 4.777222222222222 hours\n",
      "Validation at Epoch 84 , MSE: 0.26086443063852494 , Pearson Correlation: 0.8296553113214624 with p-value: 0.0 , Concordance Index: 0.8777254615501396\n",
      "Training at Epoch 85 iteration 0 with loss 0.120635. Total time 4.7972222222222225 hours\n",
      "Training at Epoch 85 iteration 100 with loss 0.08816938. Total time 4.827222222222222 hours\n",
      "Validation at Epoch 85 , MSE: 0.26182667232636136 , Pearson Correlation: 0.8265116530095487 with p-value: 0.0 , Concordance Index: 0.8792856341350184\n",
      "Training at Epoch 86 iteration 0 with loss 0.11377849. Total time 4.854444444444445 hours\n",
      "Training at Epoch 86 iteration 100 with loss 0.14792128. Total time 4.8902777777777775 hours\n",
      "Validation at Epoch 86 , MSE: 0.257871862002942 , Pearson Correlation: 0.8262982386675369 with p-value: 0.0 , Concordance Index: 0.8751930138767572\n",
      "Training at Epoch 87 iteration 0 with loss 0.057008244. Total time 4.918888888888889 hours\n",
      "Training at Epoch 87 iteration 100 with loss 0.14603473. Total time 4.950555555555556 hours\n",
      "Validation at Epoch 87 , MSE: 0.263568273473235 , Pearson Correlation: 0.8253447321303361 with p-value: 0.0 , Concordance Index: 0.8749047856880403\n",
      "Training at Epoch 88 iteration 0 with loss 0.10075353. Total time 4.972222222222222 hours\n",
      "Training at Epoch 88 iteration 100 with loss 0.12039696. Total time 5.000277777777778 hours\n",
      "Validation at Epoch 88 , MSE: 0.25550148939176437 , Pearson Correlation: 0.8298689411482112 with p-value: 0.0 , Concordance Index: 0.8774585754486789\n",
      "Training at Epoch 89 iteration 0 with loss 0.12594306. Total time 5.020277777777777 hours\n",
      "Training at Epoch 89 iteration 100 with loss 0.1246362. Total time 5.0475 hours\n",
      "Validation at Epoch 89 , MSE: 0.24959007286686574 , Pearson Correlation: 0.8325394659794637 with p-value: 0.0 , Concordance Index: 0.87992501666663\n",
      "Training at Epoch 90 iteration 0 with loss 0.07764681. Total time 5.066666666666666 hours\n",
      "Training at Epoch 90 iteration 100 with loss 0.14072537. Total time 5.0938888888888885 hours\n",
      "Validation at Epoch 90 , MSE: 0.24912427669655499 , Pearson Correlation: 0.8330177762357154 with p-value: 0.0 , Concordance Index: 0.8783545030704003\n",
      "Training at Epoch 91 iteration 0 with loss 0.10876969. Total time 5.113333333333333 hours\n",
      "Training at Epoch 91 iteration 100 with loss 0.14270067. Total time 5.1402777777777775 hours\n",
      "Validation at Epoch 91 , MSE: 0.26092907399410037 , Pearson Correlation: 0.8231770606484585 with p-value: 0.0 , Concordance Index: 0.8757098444227845\n",
      "--- Go for Testing ---\n",
      "Up to Epoch 90 Testing MSE: 0.2877838428238773 , Pearson Correlation: 0.8065687434549503 with p-value: 0.0 , Concordance Index: 0.8550258935934616\n",
      "Training at Epoch 92 iteration 0 with loss 0.15963535. Total time 5.168888888888889 hours\n",
      "Training at Epoch 92 iteration 100 with loss 0.15776704. Total time 5.2027777777777775 hours\n",
      "Validation at Epoch 92 , MSE: 0.2733681236565757 , Pearson Correlation: 0.8224035668837613 with p-value: 0.0 , Concordance Index: 0.8702145869866073\n",
      "Training at Epoch 93 iteration 0 with loss 0.13738127. Total time 5.2283333333333335 hours\n",
      "Training at Epoch 93 iteration 100 with loss 0.09464588. Total time 5.257777777777778 hours\n",
      "Validation at Epoch 93 , MSE: 0.2592474879780267 , Pearson Correlation: 0.8249284688112556 with p-value: 0.0 , Concordance Index: 0.8765309647283505\n",
      "Training at Epoch 94 iteration 0 with loss 0.061604567. Total time 5.280833333333334 hours\n",
      "Training at Epoch 94 iteration 100 with loss 0.08830592. Total time 5.311388888888889 hours\n",
      "Validation at Epoch 94 , MSE: 0.26925463901158697 , Pearson Correlation: 0.8292712678140265 with p-value: 0.0 , Concordance Index: 0.8823430531505981\n",
      "Training at Epoch 95 iteration 0 with loss 0.10776222. Total time 5.334444444444444 hours\n",
      "Training at Epoch 95 iteration 100 with loss 0.056225765. Total time 5.373888888888889 hours\n",
      "Validation at Epoch 95 , MSE: 0.2574206659211684 , Pearson Correlation: 0.8254550203610729 with p-value: 0.0 , Concordance Index: 0.8778431730623255\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training at Epoch 96 iteration 0 with loss 0.07951173. Total time 5.396388888888889 hours\n",
      "Training at Epoch 96 iteration 100 with loss 0.132771. Total time 5.424166666666666 hours\n",
      "Validation at Epoch 96 , MSE: 0.2514005420119406 , Pearson Correlation: 0.8291441056420777 with p-value: 0.0 , Concordance Index: 0.8813201731129304\n",
      "Training at Epoch 97 iteration 0 with loss 0.11086571. Total time 5.4447222222222225 hours\n",
      "Training at Epoch 97 iteration 100 with loss 0.07725177. Total time 5.472777777777778 hours\n",
      "Validation at Epoch 97 , MSE: 0.2606436310062132 , Pearson Correlation: 0.8239360805645863 with p-value: 0.0 , Concordance Index: 0.8796763923511719\n",
      "Training at Epoch 98 iteration 0 with loss 0.11292854. Total time 5.493055555555555 hours\n",
      "Training at Epoch 98 iteration 100 with loss 0.08288786. Total time 5.523611111111111 hours\n",
      "Validation at Epoch 98 , MSE: 0.26723295819206155 , Pearson Correlation: 0.8246861427659851 with p-value: 0.0 , Concordance Index: 0.8810612077861215\n",
      "Training at Epoch 99 iteration 0 with loss 0.09610099. Total time 5.545277777777778 hours\n",
      "Training at Epoch 99 iteration 100 with loss 0.11418502. Total time 5.575 hours\n",
      "Validation at Epoch 99 , MSE: 0.28096003299896516 , Pearson Correlation: 0.8254997172091929 with p-value: 0.0 , Concordance Index: 0.8759036833802346\n",
      "Training at Epoch 100 iteration 0 with loss 0.1019221. Total time 5.594722222222222 hours\n",
      "Training at Epoch 100 iteration 100 with loss 0.09653718. Total time 5.625555555555556 hours\n",
      "Validation at Epoch 100 , MSE: 0.2608207890776586 , Pearson Correlation: 0.8260051643429152 with p-value: 0.0 , Concordance Index: 0.8790876147687244\n",
      "--- Go for Testing ---\n",
      "Testing MSE: 0.27118502825283775 , Pearson Correlation: 0.8204140940586422 with p-value: 0.0 , Concordance Index: 0.8559930286521047\n",
      "--- Training Finished ---\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAELCAYAAAA7h+qnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAbX0lEQVR4nO3de5gdVZnv8e+PBJAQlFxaJ1ySRnRUZBwufRi8DCrwKDCj4O2MnIggjC0Ij/LI8ZGR8RgdIuMZxdsoThwRnDTeuBwZQRQR9OABpIMhoBEDmHCLoQnXISNKeM8fa+3p3b33Tmp372vq93meenbVqtpV767s7Ler1qq1FBGYmVm5bdftAMzMrPucDMzMzMnAzMycDMzMDCcDMzMDZnY7gKmaP39+DA4OdjsMM7O+smLFiociYmByed8mg8HBQUZHR7sdhplZX5G0rl65bxOZmZmTgZmZORmYmRlOBmZmhpOBmZlRsmQwMgKDg7Dddul1ZKTbEZmZ9YaOJgNJz5L0c0m3SvqlpI/l8r0k3SRpjaRvSdqh1cceGYHhYVi3DiLS6/CwE4KZGXT+yuAp4NCI+HNgP+AISQcDnwQ+ExEvBB4BTmr1gc86CzZtmli2aVMqNzMru44mg0j+Iy9un6cADgUuzuUXAse0+tjr6j5m0bjczKxMOl5nIGmGpJXAg8DVwF3AoxHxdN7kPmD3Bu8dljQqaXRsbKyp486Y0Vy5mVmZdDwZRMTmiNgP2AM4CHhJvc0avHdZRAxFxNDAQE3XGlu0eXNz5WZmZdK11kQR8ShwHXAwsKukSj9JewAPtPp4ixY1V25mViadbk00IGnXPL8TcDiwGrgWeGve7Hjgu60+9tKlMGvWxLJZs1K5mVnZdfrKYAFwraRVwM3A1RHxPeBDwAck3QnMA77a6gMvXgzLlsEuu6TlRYvS8uLFrT6SmVn/6WgX1hGxCti/TvndpPqDtlq8GG6+GS64ANaubffRzMz6R6meQDYzs/pKmQyiblslM7PyKl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Oj3KA06Mtjkv6PpBdN2uY6SddLOjwff5Ok2yX1VLfI1j+cDGxbth54c54/h3RL5uXAFQCSTiZ1EvgrUp8x7wH2BX5S6XepymtJvWp+jDTewqpcvjvwGVLf9CeQOk37qaSX5fVXAGfn+bdVxbC+XsC5D58rgP8A/gY4Jcd0vaTJXR7vDXwOODd/zvXAxZJesMWzYlaHbxPZNisinpL0i7x4d/Utmdxt+CeBr0XEiVXlN5H6lTkJ+GzV7uYAB0bE7yYd42+r3jsDuIrU185JwPsjYkzSXXmTlRFx51bCPps0GtmRkfu+l3RDjukMUkKqmA8cEhFr8na3kBLCfwc+sZXjmE3gKwMrq5cDzwZGJM2sTKS6hl+ThkCsduPkRACQb9NcK2kjqZ/+P5K6YH7R5G23Jvf+egDwrRgfBIVII2n9DHj1pLesqSSCvN2DpCuThZg1yVcGVlaV0bF+1GD9I5OWa27r5OaqV5K6iT4pb7OZ1DroWVOIaQ6p99F6t5AqYzVXqzdE41NTPLaVnJOBldXG/HoC6bbOZE9MWq7Xve9bSFcDb46IP1YK87gBj04hpkfycf6kzro/YTxms5ZzMrBt3VP5dadJ5f+P9IP/goi4kKmZRboS+K9EIelQ0m2a31Zt1yiGCSLiSUkrgLdJWhIRm/M+FwGvAL4wxTjNtsrJwLZ1G0h/Ub9d0irgSeC3EbFR0geBL0oaIA3Q/hipddCrgesi4qKt7Psq4HTgAklfI9UVfAS4f9J2v8qvp0q6kFSvsKrBcwofIbUm+p6kLwGzSS2YHmN8/F2zlnMFsm3TIo1d+7ek+/E/Ig1L+Ia87l+AN5Iqe/+NlBA+RvojaWWBff8AeB/wSuB7pBHF3kkayap6u1uBJfm41+cYdmuwz6tIzzDsCnwb+DKwGnhV5DGnzdrBI52ZmZmvDMzMzMnAzMxwMjAzM5wMzMwMJwMzM8PJwMzMcDIwMzOcDMzMDPj/9La3m9anm8kAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "model.train(train, val, test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.save_model('./model_MPNN_AAC_Davis')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
